package org.jeecg.common.enums;

public enum MsgSubject {
    TO_READ_NOTICE("01","待阅通知"),
    TO_READ_ANNOUNT("02","待阅公告"),
    TIME_REMINDER_START("03","日程提醒（我发起的）"),
    TIME_REMINDER_JOIN("04","日程提醒（我参与的）"),
    TO_DO_LIST_START("05","待办事项（我发起的）"),
    TO_DO_LIST_JOIN("06","待办事项（我参与的）"),
    MSG_NOTICE("07","消息提醒");
    private String code;
    private String value;

    MsgSubject(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
    public static MsgSubject match(String key) {

        MsgSubject result = null;

        for (MsgSubject s : values()) {
            if (s.getCode().equals(key)) {
                result = s;
                break;
            }
        }

        return result;
    }
}
